#!/bin/bash

set -e
set -o pipefail
set -x

if ! [ -x "$(command -v go)" ]
then
  echo "error: a go binary in \$PATH is required to run newgtlds.go" >&2
  exit 1
fi

SCRIPT=$(realpath "$0")
BASEDIR=$(dirname "$SCRIPT")

go run -C "$BASEDIR/" . \
  -overwrite \
  -psl-dat-file="$BASEDIR/../public_suffix_list.dat"
